home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-02
/
proteng.zip
/
PROTENG.DOC
< prev
next >
Wrap
Text File
|
1992-07-16
|
10KB
|
252 lines
Copyright 1992 Mark Dignam and Mick Howland - Omen Computer Services
Perth Omen Bullietin Board System - 3:690/660@fidonet
The Protocol Engine (Very First Beta copy!)
The EASY way to get your Turbo Pascal programs to transfer files!
The legal stuff first:
This is MY program - i spent many long hours writing it and testing it. All
parts of it, including the source code, the compiled TPU's and the documents
will remain copywrite. You, the end user, are granted a license to use the
software provided in any manner you see fit, provided you DO NOT allow the
source code to be given or copied to any other user in any form. You paid for
the source code - I wrote it - why should somebody else profit from your MONEY
and my work?
Any executable programs that are created or compiled using either sections or
all of The Protocol Engine are yours, the end user, to do with as you wish. I
do not wish a royalty payment for any of your executables, but a note to the
effect that the Protocol Engine was used in a product would be nice.
More Legal Stuff!
The following names are trademarks and/or registered names:
Turbo Pascal Borland International.
Thanks for the code and/or designs:
Micheal Quinlan Async4 Pascal Unit
Mark G. Mendel Crc16 Tables and UpdCrc
Stephen Satchell - Satchell Evalutions Crc32 Design
Chuck Forsberg - Omen Technology The Ymodem and Zmodem Protocols
Gary S. Brown Crc32 tables
System Enhancement Assocaties The Sealink Protocol
Ward Christensen The Xmodem (original!) Protocol
Now for the real stuff.
This is only a prelim document that I threw together - if any of the Beta
testers out there want to do a better job - please do so! I might be able to
write code - but english is a shit. So even the docs are Beta Versions!
Contents of this Archive.
The first two Files are support source code for the Protocol Engine, but you
can do with what you like. The Ansi unit I wrote a long time ago for another
project, it may or may not have bugs - it works for me! The Comms unit is a
very modified version of ASYNC4 with Fossil Support and internal 16650 support.
ansi_drv.pas Source Code for a Ansi Screen Unit
comm.pas A Half Decent Comms Unit.
This is a demo program showing you how to use the Protocol Engine. It has all
of the transfer protocols in it, along with Ansi and Doorway mode.
term.pas
term.exe
Now for the real meat of the archive. The next three files are the Turbo
Pascal units. The numbers in the extenstion field are the version of TP they
are for. To use it - just copy the version you use to Proteng.tpu!
proteng.50
proteng.55
proteng.60
proteng.doc This Document!
What is a Protocol Engine?
It is a set of software routines that take all the hard work out of writing
communication software. What we have done is put together in one easy_to_use
TurboPascal (versions 5,5.5 and 6) Unit ALL the procedures and functions
required to transfer files from computer to computer, using various methods of
error checking, by a serial port.
This unit has been to designed from the ground up to fufill two requirments:
1) It must be very easy to use - for even the novice programmer experimenting
with say writing a door program etc. This has been achived by using a small
array of strings to transfer the filenames between the main program and the
unit - and then calling a simple Boolean function for each different method.
2) It must have a low DataSegment overhead - yet still offer decent size TX/RX
buffer sizes, suitable for Binkley/FrontDoor transfers and high speed modem
links. The current DataSegment use is less than 5k - while still having up to
15k disk buffering usable.
As a added incentive, since the Protocol Engine requires a Async unit to
handle high speed communications, a Comm unit is included with full source
code. This unit, which is a modified version of the Public Domain ASYNC4,
handles both Fossil and Non_Fossil evironments with ease at speeds upto 38400
baud.
Here is a dump of the header for the Protocol Engine.
Unit ProtEng;
INTERFACE
uses crt, dos,Comm;
Type
Str64 = String[64];
{ This allows you to use the same string size as used by the Filename array }
Const
MaxZBlockSize : Word = 1024;
MaxRetrys : Byte = 10;
{ MaxZBlockSize is the size of the maximum data block that can be sent using }
{ Zmodem. For most terminal packages - this must be left at 1k! However most }
{ mailers such as Binkley can handle a 8k Zmodem data block. }
{ MaxRetrys is the point at which the Protocol Engine will errorout }
Var
Thenames : Array[1..30] of str64;
NumberOfFiles : Byte;
OverWrite : Boolean;
{ Thenames is the Array of string which in
{ 1) Transmit modes contain the names of the files you wish to send to the }
{ remote computer. }
{ 2) When reciveing files - if the mode is a single file mode - the FIRST }
{ entry must contain the filename including FULL path, otherwise when in }
{ batch mode - the first entry must contain the full upload path to place }
{ the files. Upon return - the array will be filled with the names of the }
{ files that have been recieved. }
{ NumberOfFiles: }
{ 1) In transmit modes - this contains the number of entrys in the filename }
{ array you wish to send. }
{ }
{ 2) In recieve modes - this will return with the number of files that were }
{ recieved, and this many names will be in the filename array. }
{ OverWrite: }
{ This is a Boolean flag used in recieving to allow either Overwriting of }
{ existing files, or when using Zmodem, allows CrashRecovery. If this }
{ flag is left to its default of False - the file will be renamed if it }
{ exists in the directory already. }
Function Xmodemrx : Boolean; {Done!} {Has Auto 1k checking}
Function XmodemTX : Boolean; {Done!}
Function Xmodem1kTX : Boolean; {Done!}
Function YmodemTX : Boolean; {Done!} {Has Auto Gmode Checking}
Function YmodemRx : Boolean; {Done!}
Function YmodemGRX : Boolean; {Done!}
Function ZmodemTX : Boolean; {Done!}
Function ZmodemRX : Boolean; {Done!}
Function YappRX : Boolean; {Done!}
Function YappTx : Boolean; {Done!}
(*
Function SealinkTx : Boolean; { not quite finished yet!}
Function SealinkRx : Boolean;
*)
The beta release of the Protocol Engine will be available from The Perth Omen
BBS. This is a Turbo Pascal unit (versions 5, 5.5 and 6) that transfers files
for you!
It has support for Xmodem, Xmodem 1k Blocks, Ymodem Batch, Ymodem-G Batch,
Zmodem (both Crc16 and CRC32) and Yapp (a packet radio protocol).
The Zmodem mode supports full crash recovery in both send and receive modes,
the batch modes have a limit (easily changed) of 30 files in a transfer, but
overwrite or create a new file when receiving is also there. The unit has its
own comms driver good upto 38kbs built-in, but will use a Fossil if fitted.
The Sealink protocol (with full Overdrive and Recovery built in) will be going
in the release version - but not in the beta.
The release version will be available in three flavours:
1) the compiled TPU's with sample Term program with source for the term
program, the Comms unit and the Ansi unit included - but NO source for the
TPU's. It will also have an "annoying" copywrite message hard coded into
the TPU's. This is the shareware demo version that will allowed on BBS's.
2) As above - but without the annoying message. This will cost $20A for
registation (plus $5 postage if needed) and will be a full legal copy with
BBS support.
3) The FULL source code to everything. This has over 150k of pascal source for
the entire Protocol engine with NO royalties attached. This will cost $100A
(plus $5 postage where needed) and BBS support will be given though the
Perth Omen BBS.
Known Features (ok.. Bugs!)
1) The Protocol Engine is very nasty about filenames and/or paths which are
sent to it for transfer and don't exist. This is up to YOU to make sure that the
both paths for uploads and the names for download do REALLY exist. This
includes the download dir which MUST have a trailing "\"! When sending,
it will bypass a file that doesn't exist with a IoResult - but the results
afterwards could be interesting to watch. However in the same breath, if a
file is uploaded with a pathname in the filename header - the path is
stripped - and your's put in its place.
2) Sealink isn't done yet. Please read further on as to future directions.
Future Directions.
1) I plan to have the Sealink (with OverDrive and Crash Recovery) in as soon
as possible. But work commiments don't allow me to do this - I hope to have
it done by the time i have a public release ready.
2) Improvments to the Yapp Packet radio protocol - To come into line with what
Tony (from Paket5 fame) has done with Paket for crash recovery.
3) A hook into the transfer section so you get a) check for dupe name b) Get a
log entry as soon as the file is transfered - not at the end of the batch.
Any feedback - please do so via netmail or direct connection to the Perth Omen
BBS +61 (9) 244-2111 (V32 - 3 Lines).
Mark Dignam and Mick Howland - Sysops.
p.s. Have fun!